<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.7.2/css/all.min.css" integrity="sha256-dABdfBfUoC8vJUBOwGVdm8L9qlMWaHTIfXt+7GnZCIo=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"blog.csgrandeur.cn","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.22.0","exturl":false,"sidebar":{"position":"left","width_expanded":320,"width_dual_column":240,"display":"post","padding":18,"offset":12},"hljswrap":true,"copycode":{"enable":true,"style":"default"},"fold":{"enable":false,"height":500},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"duration":200,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"top_n_per_article":1,"unescape":false,"preload":false,"trigger":"auto"}}</script><script src="/js/config.js"></script>

    <meta name="description" content="搜索加速技巧 双向搜索、A*、IDA*等 BFS、DFS 的改进策略。">
<meta property="og:type" content="article">
<meta property="og:title" content="28.搜索加速技巧">
<meta property="og:url" content="http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/index.html">
<meta property="og:site_name" content="CSGrandeur&#39;s Thinking">
<meta property="og:description" content="搜索加速技巧 双向搜索、A*、IDA*等 BFS、DFS 的改进策略。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/%E5%8F%8C%E5%90%91%E5%B9%BF%E6%90%9C.svg">
<meta property="og:image" content="http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/%E5%85%AB%E6%95%B0%E7%A0%81.png">
<meta property="article:published_time" content="2025-04-23T11:43:32.000Z">
<meta property="article:modified_time" content="2025-05-23T08:56:15.350Z">
<meta property="article:author" content="CSGrandeur">
<meta property="article:tag" content="ACM">
<meta property="article:tag" content="Algorithm">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/%E5%8F%8C%E5%90%91%E5%B9%BF%E6%90%9C.svg">


<link rel="canonical" href="http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/">


<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/","path":"2025-04-23-28-搜索加速技巧/","title":"28.搜索加速技巧"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>28.搜索加速技巧 | CSGrandeur's Thinking</title>
  

  <script src="/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?7958adf931092425a489778560129144"></script>







  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">CSGrandeur's Thinking</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">Cogito Ergo Sum</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
      <div class="search-header">
        <span class="search-icon">
          <i class="fa fa-search"></i>
        </span>
        <div class="search-input-container">
          <input autocomplete="off" autocapitalize="off" maxlength="80"
                placeholder="搜索..." spellcheck="false"
                type="search" class="search-input">
        </div>
        <span class="popup-btn-close" role="button">
          <i class="fa fa-times-circle"></i>
        </span>
      </div>
      <div class="search-result-container">
        <div class="search-result-icon">
          <i class="fa fa-spinner fa-pulse fa-5x"></i>
        </div>
      </div>
    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7"><span class="nav-number">1.</span> <span class="nav-text">搜索加速技巧</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%8C%E5%90%91bfs"><span class="nav-number">1.1.</span> <span class="nav-text">双向BFS</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%8C%E5%90%91dfs"><span class="nav-number">1.2.</span> <span class="nav-text">双向DFS</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BE%8B%E9%87%8D%E9%87%8F%E8%83%8C%E5%8C%85"><span class="nav-number">1.2.1.</span> <span class="nav-text">例：重量背包</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#a"><span class="nav-number">1.3.</span> <span class="nav-text">A*</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BE%8B%E5%85%AB%E6%95%B0%E7%A0%81"><span class="nav-number">1.3.1.</span> <span class="nav-text">例：八数码</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%BF%AD%E4%BB%A3%E5%8A%A0%E6%B7%B1iddfs"><span class="nav-number">1.4.</span> <span class="nav-text">迭代加深（IDDFS）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ida"><span class="nav-number">1.5.</span> <span class="nav-text">IDA*</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">CSGrandeur</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">72</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">6</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">22</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://blog.csgrandeur.cn/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="CSGrandeur">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="CSGrandeur's Thinking">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="28.搜索加速技巧 | CSGrandeur's Thinking">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          28.搜索加速技巧
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2025-04-23 19:43:32" itemprop="dateCreated datePublished" datetime="2025-04-23T19:43:32+08:00">2025-04-23</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2025-05-23 16:56:15" itemprop="dateModified" datetime="2025-05-23T16:56:15+08:00">2025-05-23</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/ACM/" itemprop="url" rel="index"><span itemprop="name">ACM</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/ACM/ACMCOURSE/" itemprop="url" rel="index"><span itemprop="name">ACMCOURSE</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><h1 id="搜索加速技巧">搜索加速技巧</h1>
<p>双向搜索、<code>A*</code>、<code>IDA*</code>等 BFS、DFS
的改进策略。</p>
<span id="more"></span>
<h2 id="双向bfs">双向BFS</h2>
<p>回顾BFS</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">struct</span> <span class="title class_">Node</span> &#123;</span><br><span class="line">    <span class="type">int</span> x, y;</span><br><span class="line">    <span class="built_in">Node</span>() &#123; x = y = <span class="number">0</span>; &#125;</span><br><span class="line">    <span class="built_in">Node</span>(<span class="type">int</span> x_, <span class="type">int</span> y_) &#123;</span><br><span class="line">        x = x_;</span><br><span class="line">        y = y_;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="function"><span class="type">int</span> <span class="title">BFS</span><span class="params">(<span class="type">int</span> startX, <span class="type">int</span> startY)</span> </span>&#123;</span><br><span class="line">    std::queue&lt;Node&gt; q;</span><br><span class="line">    q.<span class="built_in">push</span>(<span class="built_in">Node</span>(startX, startY));</span><br><span class="line">    visited[startX][startY] = <span class="literal">true</span>;</span><br><span class="line">    <span class="keyword">while</span> (!q.<span class="built_in">empty</span>()) &#123;</span><br><span class="line">        Node now = q.<span class="built_in">front</span>();</span><br><span class="line">        q.<span class="built_in">pop</span>();</span><br><span class="line">        <span class="keyword">if</span> (now.x == endX &amp;&amp; now.y == endY) <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line">        <span class="keyword">for</span> (<span class="type">int</span> i = <span class="number">0</span>; i &lt; <span class="number">4</span>; i++) &#123;</span><br><span class="line">            <span class="type">int</span> nextX = now.x + dx[i], nextY = now.y + dy[i];</span><br><span class="line">            <span class="keyword">if</span> (graph[nextX][nextY] &amp;&amp; !visited[nextX][nextY]) &#123;</span><br><span class="line">                visited[nextX][nextY] = <span class="literal">true</span>;</span><br><span class="line">                q.<span class="built_in">push</span>(<span class="built_in">Node</span>(nextX, nextY));</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>BFS利用队列实现从一点出发，一层一层外扩式搜索。</p>
<p>当知道起点与终点，目的是找到合法最短路时，从起点和终点同时搜索可以极大减小搜索空间。</p>
<p>相比单向BFS,双向BFS可以大大减少搜索空间。假设单向广搜需要搜索到第d层才能到达终点,搜索空间约为<span
class="math inline">\(b^d\)</span>(b为每个节点平均分支数)。而双向广搜只需要各自搜索到第d/2层,搜索空间约为<span
class="math inline">\(2b^{d/2}\)</span>,远小于<span
class="math inline">\(b^d\)</span>。</p>
<img src="/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/%E5%8F%8C%E5%90%91%E5%B9%BF%E6%90%9C.svg" class="">
<h2 id="双向dfs">双向DFS</h2>
<p>思想类似，如回溯枚举子集找最优解的问题中，搜索一部分元素的所有子集，再搜索另一部分元素的所有子集，进而拼凑符合条件的方案，也能指数级降低复杂度。</p>
<h3 id="例重量背包">例：重量背包</h3>
<p><span class="math inline">\(n\)</span>
个物品，每个物品有一定重量，在不超过背包容量前提下，最多装多少重量的物品。</p>
<p>思路：</p>
<ul>
<li>回溯枚举前半数物品所有子集，记录能凑出的所有重量，记录并排序。</li>
<li>回溯枚举后半数物品的所有子集，每得到一个子集，用背包容量减去这个子集的重量，剩余重量二分查找前半数物品能凑出的不超出的最大值。</li>
</ul>
<h2 id="a">A*</h2>
<p><code>A*</code>是BFS的改进算法，将BFS的队列改为优先级队列，其优先级是一个“启发式”的函数，每个节点的优先级为:</p>
<p><span class="math inline">\(f(n) = g(n) + h(n)\)</span></p>
<p>其中: - <span
class="math inline">\(g(n)\)</span>是从起点到当前节点<span
class="math inline">\(n\)</span>的实际代价 - <span
class="math inline">\(h(n)\)</span>是从当前节点<span
class="math inline">\(n\)</span>到终点的估计代价(启发函数)</p>
<p>常见的启发函数:</p>
<ul>
<li>曼哈顿距离:适用于网格图,只能上下左右移动。两点间的曼哈顿距离为 <span
class="math inline">\(|x1-x2| +
|y1-y2|\)</span>，即横向和纵向距离之和</li>
<li>欧几里得距离:适用于八方向移动。两点间的欧几里得距离为 <span
class="math inline">\(sqrt((x1-x2)^2 +
(y1-y2)^2)\)</span>，即直线距离</li>
<li>对角线距离:适用于网格图,可以斜向移动。两点间的对角线距离为 <span
class="math inline">\(max(|x1-x2|,
|y1-y2|)\)</span>，因为可以斜着走,只需要走最长的那条边的距离</li>
</ul>
<p>A*算法相比BFS,通过启发函数引导搜索朝目标方向进行,可以大大减少搜索空间。但如果启发函数设计不当,可能会失去最优性。</p>
<h3 id="例八数码">例：八数码</h3>
<style>.pkwnnttahvpg{}</style>
<img src="/2025-04-23-28-%E6%90%9C%E7%B4%A2%E5%8A%A0%E9%80%9F%E6%8A%80%E5%B7%A7/%E5%85%AB%E6%95%B0%E7%A0%81.png" class="pkwnnttahvpg">
<p>九宫格放<span class="math inline">\(1\sim
8\)</span>八个数，一个空格可以看作<span
class="math inline">\(0\)</span>，<span
class="math inline">\(0\)</span>周围的格子可以移到<span
class="math inline">\(0\)</span>上，找一个移动方案将<span
class="math inline">\(1\sim
8\)</span>归位到从上到下、从左到右按顺序的排列。</p>
<p><span class="math inline">\(h\)</span>
函数可以定义为每个数距离目标位置的曼哈顿距离、不在应该在的位置的棋子个数等。</p>
<h2 id="迭代加深iddfs">迭代加深（IDDFS）</h2>
<p>“以DFS方式实现的BFS”</p>
<p>BFS从近到远一点点向外搜索，用队列实现。而IDDFS也是从近到远一点点扩大搜索范围，每次限制一个DFS深度，进行DFS，到达深度就返回，搜完没找到答案时，扩大深度限制，再进行一次DFS。</p>
<p>当BFS的搜索空间过大时，考虑用IDDFS，适合场景：</p>
<ul>
<li>解的深度未知</li>
<li>搜索空间巨大</li>
<li>内存受限</li>
</ul>
<h2 id="ida"><code>IDA*</code></h2>
<p><code>IDA*</code>是迭代加深搜索(IDDFS)和<code>A*</code>的结合。它使用迭代加深的框架，但每次深度限制不是搜索深度，而是启发函数值的限制。</p>
<p>具体来说:</p>
<ol type="1">
<li>设定初始的启发函数值限制</li>
<li>用DFS方式搜索,但当 <span class="math inline">\(f(n) = g(n) +
h(n)\)</span> 超过限制时就返回</li>
<li>如果没找到解，增大启发函数值限制，重新搜索</li>
<li>重复以上步骤直到找到解</li>
</ol>
<p><code>IDA*</code>相比<code>A*</code>的优点:</p>
<ul>
<li>空间复杂度低,因为用DFS实现</li>
<li>不需要维护开放列表和关闭列表</li>
<li>适合搜索空间巨大的问题</li>
</ul>
<p>缺点是可能会重复搜索一些状态。</p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/ACM/" rel="tag"># ACM</a>
              <a href="/tags/Algorithm/" rel="tag"># Algorithm</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2025-04-23-27-%E5%88%86%E6%94%AF%E9%99%90%E7%95%8C%E4%B8%8E%E5%89%AA%E6%9E%9D/" rel="prev" title="27.分支限界与剪枝">
                  <i class="fa fa-angle-left"></i> 27.分支限界与剪枝
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2025-04-23-29-%E5%B9%B6%E6%9F%A5%E9%9B%86/" rel="next" title="29.并查集">
                  29.并查集 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    <div class="comments utterances-container"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">CSGrandeur</span>
  </div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>
  <div class="sidebar-dimmer"></div>
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://fastly.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://fastly.jsdelivr.net/npm/@next-theme/pjax@0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/sidebar.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://fastly.jsdelivr.net/npm/hexo-generator-searchdb@1.4.1/dist/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>







  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://fastly.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


<script class="next-config" data-name="utterances" type="application/json">{"enable":true,"repo":"CSGrandeur/csgrandeur.github.io","issue_term":"pathname","theme":"github-light"}</script>
<script src="/js/third-party/comments/utterances.js"></script>

</body>
</html>
